<template>
    <div class="cfunding-page">
        <div class="cfunding-content">
            <appdownload></appdownload>
            <cfcard :json="json"></cfcard>
            <tabbars></tabbars>
        </div>
    </div>
</template>

<script>
import instance from '../request/api'
import tabbars from '../components/Tabbars.vue'
import appdownload from '../components/appDownload.vue'
import cfcard from '../components/cFunding/cFcard.vue'
export default {
    name:"cFunding",
    props: {

    },
    data() {
        return {  
            json : []    
        };
    },
    computed: {

    },
    created() {
        this.getJsonData()
    },
    mounted() {
    },
    watch: {

    },
    methods: {
        async getJsonData(){
            let {data} = await instance.get('/cfunding.json');
            this.json = data.data.itemlist
            this.json.map(el=>{
                el.ranArr  = [this.getRandom(1,100),this.getRandom(1,180),this.getRandom(1,220),this.getRandom(1,6000)]
                return el
            })
            return this.json
        },
        getRandom(min,max){
            return Math.floor(Math.random()*(max-min+1)+min)
        },
    },
    components: {
        tabbars,
        appdownload,
        cfcard
    },
};
</script>

<style scoped lang="less">
.cfunding-page{
    max-width: 7.5rem;
    min-height: 13.34rem;
    font-size: 16px;
    .cfunding-content{
        width: 100%;
        height: auto;
        
    }
}
</style>
